<div class="head">
  <div class="logo" onclick="window.open('<?php echo site_url('') ?>');"></div>  
  <div class="clearer"></div>
  <div class="title">
    <div class="b_menu">
      <ul class="mainmenu">
        <?php 
        $controller = $this->uri->segment(2);
        $action = $this->uri->segment(3);
        ?>
        <li <?php echo $controller == '' || $controller == 'provider' || $controller == 'index' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Home</span>
            <span class="Items_right"></span>
          </a>
        </li>
        <?php if(userdata('provider_id')) { ?> 
        <li <?php echo $controller == 'promotion' && $action == '' || 
                       $action=='index' || $action=='create' ||
                       $action=='edit' || $action=='check' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider/promotion') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Promotions</span> <span class="Items_right">
            </span>
          </a>
        </li>
        <li <?php echo $controller == 'statistic' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider/statistic') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Statistic</span> 
            <span class="Items_right"></span>
          </a>
        </li>
        <li <?php echo $controller == 'profile' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider/profile') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Profile</span> 
            <span class="Items_right"></span>
          </a>
        </li>
        <li>
          <a class="Items" target="_blank" href="<?php echo site_url('index/provider/'.userdata('provider_user_id')) ?>">
            <span class="Items_left"></span>
            <span class="Items_center">My site</span> 
            <span class="Items_right"></span>
          </a>
        </li>
        <?php } ?>        
        <li <?php echo $controller == 'contact' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider/contact') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Contact us</span> 
            <span class="Items_right"></span>
          </a>
        </li>
        <li <?php echo $controller == 'help' ? 'class="active"' : '' ?>>
          <a class="Items" href="<?php echo site_url('provider/help') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Help</span> 
            <span class="Items_right"></span>
          </a>
        </li>
        <?php if(userdata('provider_id')) { ?>         
        <li>
          <a class="Items" href="<?php echo site_url('provider/logout') ?>">
            <span class="Items_left"></span>
            <span class="Items_center">Logout</span> 
            <span class="Items_right"></span>
          </a>
        </li>        
        <?php } ?>
      </ul>
    </div>
  </div>
</div>